# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Genomics.V1.Model.PersistentDisk do
  @moduledoc """
  Configuration for a persistent disk to be attached to the VM. See https://cloud.google.com/compute/docs/disks/performance for more information about disk type, size, and performance considerations.

  ## Attributes

  *   `sizeGb` (*type:* `integer()`, *default:* `nil`) - The size, in GB, of the disk to attach. If the size is not specified, a default is chosen to ensure reasonable I/O performance. If the disk type is specified as `local-ssd`, multiple local drives are automatically combined to provide the requested size. Note, however, that each physical SSD is 375GB in size, and no more than 8 drives can be attached to a single instance.
  *   `sourceImage` (*type:* `String.t`, *default:* `nil`) - An image to put on the disk before attaching it to the VM.
  *   `type` (*type:* `String.t`, *default:* `nil`) - The Compute Engine disk type. If unspecified, `pd-standard` is used.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :sizeGb => integer() | nil,
          :sourceImage => String.t() | nil,
          :type => String.t() | nil
        }

  field(:sizeGb)
  field(:sourceImage)
  field(:type)
end

defimpl Poison.Decoder, for: GoogleApi.Genomics.V1.Model.PersistentDisk do
  def decode(value, options) do
    GoogleApi.Genomics.V1.Model.PersistentDisk.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Genomics.V1.Model.PersistentDisk do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
